package com.lecyon.farm.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lecyon.farm.base.BaseRequestPageVo;
import com.lecyon.farm.base.BaseResponse;
import com.lecyon.farm.base.RestResponse;
import com.lecyon.farm.entity.FmWork;
import com.lecyon.farm.rest.IRestService;
import com.lecyon.farm.vo.add.AddFmWorkVo;
import com.lecyon.farm.vo.data.FmWorkStatisticByAreaVo;
import com.lecyon.farm.vo.export.ExportFmWorkVo;
import com.lecyon.farm.vo.modify.ModifyFmWorkVo;
import com.lecyon.farm.vo.query.QueryFmWorkVo;
import com.lecyon.farm.vo.status.StatusVo;
import com.lecyon.farm.vo.view.FmWorkVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * 农机作业 Service
 *
 * @author YaoZheng
 * @since 2020-04-02
 */
public interface IFmWorkService extends IRestService<AddFmWorkVo, ModifyFmWorkVo, FmWork, QueryFmWorkVo, FmWorkVo, Page, StatusVo, ExportFmWorkVo> {

    /**
     * 查询日报列表
     *
     * @param vo
     * @return
     */
    RestResponse<Page<FmWorkVo>> dailyDataList(BaseRequestPageVo<QueryFmWorkVo> vo);

    /**
     * 获取所有统计后的数据列表并加载到缓存中
     *
     * @return 查询结果
     */
    BaseResponse reloadDailyDataList();

    /**
     * 查询按区域统计作业
     *
     * @param vo
     * @return
     */
    List<FmWorkStatisticByAreaVo> selectStatisticByArea(QueryFmWorkVo vo);

    /**
     * 查询按区域统计作业(仅昨天)
     *
     * @param officeCode
     * @return
     */
    RestResponse<BigDecimal> getTotalWorkQuantityByAreaYesterday(String officeCode);


}
